/**
 * Copyright 2008 by Robert Konigsberg
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the same terms as Perl.
 *
 * @see http://www.perl.com/perl/misc/Artistic.html
 */
package visitor.client;

import static visitor.maze.Direction.EAST;
import static visitor.maze.Direction.SOUTH;
import visitor.maze.Maze;
import visitor.maze.MazeBuilder;

public class Mazes {

  /**
   * Returns a maze that looks like this:
   *
   * <pre>
   *     1==2  3
   *     |  |  |
   *  4==5  6==7==8
   *     |  |  |  |
   *     9=10 11 12
   *        |
   *       13=14=15
   * </pre>
   *
   * All edges are two-way
   */
  public static Maze getFirstMaze() {
    return new MazeBuilder()
      .twoWayConnect(1, 2, EAST)
      .twoWayConnect(1, 5, SOUTH)
      .twoWayConnect(2, 6, SOUTH)
      .twoWayConnect(3, 7, SOUTH)
      .twoWayConnect(4, 5, EAST)
      .twoWayConnect(5, 9, SOUTH)
      .twoWayConnect(6, 7, EAST)
      .twoWayConnect(6, 10, SOUTH)
      .twoWayConnect(7, 8, EAST)
      .twoWayConnect(7, 11, SOUTH)
      .twoWayConnect(8, 12, SOUTH)
      .twoWayConnect(9, 10, EAST)
      .twoWayConnect(10, 13, SOUTH)
      .twoWayConnect(13, 14, EAST)
      .twoWayConnect(14, 15, EAST)
      .getMaze();
  }
}
